<?php
namespace api\controllers;

use api\components\OperateException;
use yii\web\Controller;

/**
 * 错误处理控制器
 */
class ErrorController extends Controller
{
    /**
     * @inheritdoc
     */
    public function actions()
    {
        return [
            'index' => [
                'class' => 'yii\web\ErrorAction',
            ],
        ];
    }

    public function actionLogin()
    {
        throw new OperateException('100010');
    }
}
